<?php


namespace app\common\model;


use think\Model;

class SystemModel extends Model
{
    protected $name = 'system';

    public function getConfigInfo(): array
    {
        try {
            $data = $this->get(1);
            $data->logo_ico = full_url($data->logo_ico);
            $data->logo1 = full_url($data->logo1);
            $data->logo2 = full_url($data->logo2);
            $data->wx_image = full_url($data->wx_image);
            $data->tmall_image = full_url($data->tmall_image);
            $data->douyin_image = full_url($data->douyin_image);
            return [
                'code' => 200,
                'msg' => '请求成功',
                'data' => $data
            ];
        }catch (\Exception $e) {
            return [
                'code' => $e->getCode(),
                'msg' => $e->getMessage(),
                'data' => []
            ];
        }
    }

}